﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NangLuongTieuDiemDTO.DTO;
using NangLuongTieuDiemDAO.DAO;

namespace NangLuongTieuDiemBUS.BUS
{
    public class LoiHeThongBUS
    {
        #region "[Insert]"
        public void Insert(LoiHeThongDTO lhtDto)
        {
           
            try
            {
               LoiHeThongDAO.Insert(lhtDto);
            }
            catch { }
           
        }
        #endregion

        #region "[Delete]"
        public bool Delete(int ID)
        {
            bool isSuccess = false;
            try
            {
                isSuccess = LoiHeThongDAO.Delete(ID);
            }
            catch { }
            return isSuccess;
        }
        #endregion

        #region "[Update]"
        public bool Update(LoiHeThongDTO lhtDto)
        {
            bool isSuccess = false;
            try
            {
                isSuccess = LoiHeThongDAO.Update(lhtDto);
            }
            catch { }
            return isSuccess;
        }
        #endregion

        #region "[Get all]"
        public List<LoiHeThongDTO> GetAll()
        {
            List<LoiHeThongDTO> listobjs = new List<LoiHeThongDTO>();
            try
            {
                listobjs = LoiHeThongDAO.GetAll();
            }
            catch { }
            return listobjs;
        }
        #endregion

        #region "[SelectByPrimaryKey]"
        public LoiHeThongDTO SelectByPrimaryKey(int ID)
        {
            LoiHeThongDTO obj = null;
            try
            {
                obj = LoiHeThongDAO.SelectByPrimaryKey(ID);
            }
            catch { }
            return obj;
        }

        #endregion
    }
}
